home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-4543
/
mvg
/
mod_code
/
mod_func.txt
< prev
next >
Wrap
Text File
|
1987-04-21
|
7KB
|
162 lines
Module access to MVG:
METHOD TWO
(not available before v1.3)
All references to VIDEO are to the LOGICAL Video (ie LOGBASE not physbase)
All references to Long words that hold two values (ie MOUSE_XY) have
the first value in the high_word and the second value in the low_word.
sample: MOUSE_XY X,Y in D0.L high_word=X, low_word=Y
AsciiZ String is a null terminated ASCII string: "Abcdef ghi",0
Func# Label, Description and Return values (or register prep)
0 GET_PTRS: retrieves pointers to Variables.
A0--> Varlist: long pointers to MVG's Vars
offset item.size
0 wid.W byte width of image
4 hgt.W height of image
8 pix.W pixel width of image
12 rez.L micron info w,h (2 words)
16 *
20 mouse_xy.L X,Y coords of Mouse...
see WHEREM
24 cbf.W flag: 0 = CB Empty
28 *
32 int_in pointers to MVG's
36 addr_in AES arrays
40 int_out
42 addr_out
1 GET_BUFS: get details of main & CB buffers
A0--> MAIN buffer (image)
D0.L = WID.HGT
D1.L = Total size of buffer
A2--> ClipBoard ( 0 if not allocated)
2 GET_CB: get pointer to CB only
A0--> ClipBoard ( or 0 if none)
3 copy VID2CB: copies current video to ClipBoard
4 copy VID2MAIN: copies current video to MAIN image buffer.
This will also reset WID & PIX to 80 and 640
Options include 4 pages within MAIN.
Call with page number in D0.L
will set HGT to 400xPAGE# if greater than current HGT
5 copy CB2MAIN: copies the ClipBoard to MAIN buffer.
Same options for paging as in function#4
6 copy MAIN2CB: copies MAIN buffer to CB. Same options as #4 & #5
(functions 4-6 expect the MAIN to be 640 pixels wide)
7 rsvd
8 ANYKEY: Waits for key. Returns keypress in D0.L
9 WHEREM: Polls mouse location and button status. (no wait)
Returns mouse X,Y in D1.L
button status in D0
(also stores x,y in MOUSE_XY)
10 SETXY: Sets X,Y for main image display
call w/ D0.L = Tab.Row
Tab = offset from left edge of image (8 pixel step)
Row = Top row for display (valid: 0 to hgt-380)
11 GDISPLAY: Display main image (using tab & row)
12 DISPLAY_CB: Display the ClipBoard
13 TOPTITLE: Print a text string centered in the menu bar area.
Call w/ A0--> ASCIIZ string (null terminated)
14 HI_CHAR: Print character in D0.b
15 HI_STRING: Print string. A0--> AsciiZ string
16 PHEX1: Print hexascii of byte in D0 (2-digit)
17 HEXIT: Print hexascii of word in D0 (4-digit)
18 HEXITL: Print hexascii of longword in D0 (8-digit)
19 BDEC2: Print decimal of byte in D0 (0-99)
20 BDEC3: Print decimal of word in D0 (0-999)
21 BDEC4: Print decimal of word in D0 (0-9999)
22 GETMISC: Get pointers to strings for ASKMISC (for f_sel)
A0--> directory string (80 chars max)
A1--> file string (16 chars max)
A2--> tot_pathspec (96 chars max)
23 ASKMISC: Call F_SEL, ask for file.
returns: D0.L = negative if error or blank
builds full pathspec into string at TOT_PATHSPEC
24 rsvd
25 rsvd
26 COPYTOZ: Copies an AsciiZ string... (until zero byte, inclusive)
call w/ A0--> source string
A1--> destination
27 APPENDTO: Copies an AsciiZ string to the end of another.
call w/ A0--> source string
A1--> destination string (anywhere before 0)
28 ADDEXT: Appends an extension onto a filename string.
Searches for 'period', adds three chars afterward.
If no period found then tacks on period.
A0--> 3-character extension ("IMG" or "PI3" etc)
A1--> filename (or full pathspec)
29 rsvd
30 rsvd
31 SETMOUSEXY: Sets mouse pointer to coordinates in D0.L
32 rsvd
33 rsvd
34 rsvd
Graphic primitives
35 SETSIZE: Sets up coordinates and size for lines and boxes.
Call w/ D0= X coord
D1= Y coord
D2= width (or X2 for line)
D3= height (or Y2 for line)
36 ATOG_NRM: Set write mode to normal (replace)
37 ATOG_XOR: Set write mode to exclusive_or
38 MAKEBOX: Draw a box. as defined with SETSIZE
39 MAKEXBOX: Draw a box using XOR write mode.
40 SET_LINE: Set up x1 y1 x2 y2 for line (d0-d3 = x,y,x2,y2)
41 MAKELINE: Draw a line (d0-d3 = x,y x2,y2)
42 RECTANG_Q: Draw a filled rectangle as defined with SETSIZE
call with D0= 0 white
1 black
2 grey
3 xor
43 STILLSEC:
44 EALERT: